package org.jeecg.modules.api.controller;

import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.util.HttpRequest;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * echarts 框架地图区域开发 所需json坐标数据 接口
 */
@Slf4j
@RestController
@RequestMapping("/sys/getJson")
public class GetJsonController {

    @GetMapping(value = "/getGeoJson")
    public JSONObject getGeoJson(String code){
        String json = HttpRequest.sendGet("https://www.xiaomcc.com/json/"+code+".json");
        return JSONObject.parseObject(json);
    }

}
